let loadedScripts = [];
const importMineMap = async function(){
    return await new Promise((resolve)=>{
        if (loadedScripts.includes('mineMap')) {
            resolve();
        } else {
            let script = document.createElement('script');
            script.src ='//minedata.cn/minemapapi/v2.0.0/minemap.js';
            document.body.appendChild(script);
            script.onload = function () {
                loadedScripts.push('mineMap');
                resolve();
            };
        }
    });
}

export {
    importMineMap
}